package com.bajiao.service.cart;

import com.bajiao.entity.cart.Cart;
import com.bajiao.vo.cart.CartResponse;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * @Description: 购物车表
 * @Author: FanJq
 * @Date:   2025-01-13
 * @Version: V1.0
 */
public interface CartService extends IService<Cart> {

    /**
     * @Description
     * 添加购物车
     * @date 2025/1/13 10:57
     * @author FanJq
     * @param userId
     * @param productId
     * @param buyNum
     * @return
    */
    Cart create(String userId, String productId, Integer buyNum);

    /**
     * @Description
     * 删除购物车
     * @date 2025/1/13 11:01
     * @author FanJq
     * @param userId
     * @param ids
     * @return
    */
    void delete(String userId, String ids);

    /**
     * @Description
     * 更新购物车
     * @date 2025/1/13 11:04
     * @author FanJq
     * @param userId
     * @param productId
     * @param buyNum
     * @return
    */
    Cart modify(String userId, String productId, Integer buyNum);

    /**
     * @Description
     * 购物车列表
     * @date 2025/1/13 11:13
     * @author FanJq
     * @param userId
     * @param storeId
     * @return {@link List< CartResponse>}
    */
    List<CartResponse> getUserCartList(String userId, String storeId, String ids);

    /**
     * @Description
     * 购物车信息
     * @date 2025/1/13 16:02
     * @author FanJq
     * @param userId
     * @param storeId
     * @return {@link Map< String, Object>}
    */
    Map<String, Object> getCartInfo(String userId, String storeId);
}
